package com.iotimc.networklibrary.service;

import io.reactivex.Observable;
import okhttp3.ResponseBody;
import retrofit2.Response;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * Created by david on 2017/10/11.
 *
 * @author  david
 */

public interface DownloadService {

    //Streaming注解，该注解的作用是在下载大文件中使用。添加了该注解后，下载文件不会将所有的下载内容加载到内存
    //("/terminalsystem/readFile")
    @Streaming
    @POST
    Observable<Response<ResponseBody>> downloadFile(@Url String url);

    @POST
    Observable<ResponseBody> downloadFile2(@Url String url);
}
